/* nbd-dev.h */

#ifndef NBD_DEV_H_FILE
#define NBD_DEV_H_FILE

typedef struct NBD_DEV {
  int fd;
} NBD_DEV;

int nbd_dev_open_image(NBD_DEV *dev, const char *filename);
void nbd_dev_close(NBD_DEV *dev);
long long nbd_dev_get_size(NBD_DEV *dev);
int nbd_dev_read_data(NBD_DEV *dev, void *buf, int len, unsigned long long off);

#endif /* NBD_DEV_H_FILE */
